package cn.stylefeng.guns.modular.business.frequency.financedetail.entity;

import cn.stylefeng.guns.core.pojo.base.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.*;

import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 财务明细表
 *
 * @author yujie
 * @date 2023/05/09 17:17
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("tt_finance_detail")
public class FinanceDetail extends BaseEntity {

    /**
     * id
     */
    @TableId("id")
    private Long id;

    /**
     * 订单id
     */
    @TableField("order_id")
    private Long orderId;

    /**
     * 关联id
     */
    @TableField("relation_id")
    private Long relationId;

    /**
     * 结算人
     */
    @TableField("settlement_user")
    private String settlementUser;

    /**
     * 结算人ID
     */
    @TableField("settlement_user_id")
    private Long settlementUserId;

    /**
     * 结算人电话
     */
    @TableField("settlement_phone")
    private String settlementPhone;

    /**
     * 费用类型：1.现付收款 2.到付收款 3.欠付收款 4.月结收款 5.商务付款 6.提车付款 7.送车付款 8.承运付款 9.其他付款
     */
    @TableField("type")
    private Integer type;

    /**
     * 应结算
     */
    @TableField("need_settlement")
    private BigDecimal needSettlement;
    @TableField("settlement_site_id")
    private Long settlementSiteId;

    /**
     * 已结算
     */
    @TableField("has_settlement")
    private BigDecimal hasSettlement;

    /**
     * 未结算
     */
    @TableField("un_settlement")
    private BigDecimal unSettlement;

    /**
     * 结算状态：0待结算 1.已结算 2.已完成
     */
    @TableField("status")
    private Integer status;

    /**
     * temp_flag
     */
    @TableField("temp_flag")
    private Integer tempFlag;

    /**
     * 租户ID
     */
    @TableField(value = "tenant_id",fill = FieldFill.INSERT)
    private Long tenantId;

    @TableField(value = "settlement_type")
    private Integer settlementType;

    @TableField(value = "transport_id")
    private Long transportId;
}
